package com.bdqn.qnnews.schedule.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * @author xlz
 * @since 2024-01-15
 * @description 任务日志表
 */
@Data
// 链式语法
@Accessors(chain = true)
@TableName("taskinfo_logs")
@Schema(name = "TaskinfoLogs 对象", description = "任务日志表 实体类")
public class TaskinfoLogs {

    @Schema(description = "任务id")
    @TableId(value = "task_id", type = IdType.ASSIGN_ID)
    private Long taskId;

    @Schema(description = "执行时间")
    private LocalDateTime executeTime;

    @Schema(description = "参数")
    private String parameters;

    @Schema(description = "优先级")
    private Integer priority;

    @Schema(description = "任务类型")
    private Integer taskType;

    @Schema(description = "版本号,用于乐观锁")
    // 开启乐观锁
    @Version
    private Integer version;

    @Schema(description = "状态 0=初始化状态  1=已经执行   2=已取消")
    private Integer status;


}
